<?php

lt_include(PLOG_CLASS_PATH.'class/view/admin/adminplugintemplatedview.class.php');

// implements the main view of the google adsense plugin
class PluginGoogleAdsenseConfigView extends AdminPluginTemplatedView
{
    function PluginGoogleAdsenseConfigView($blogInfo)
	{
		$this->AdminPluginTemplatedView($blogInfo, 'googleadsense', 'googleadsense');
	}

	function render()
	{
		// load some configuration settings
		$blogSettings = $this->_blogInfo->getSettings();
		$pluginEnabled = $blogSettings->getValue('plugin_googleadsense_enabled');
		$client = $blogSettings->getValue('plugin_googleadsense_client');
		$contentWidth = $blogSettings->getValue('plugin_googleadsense_content_width');
		$contentHeight = $blogSettings->getValue('plugin_googleadsense_content_height');
		$contentFormat = $blogSettings->getValue('plugin_googleadsense_content_format');
		$contentType = $blogSettings->getValue('plugin_googleadsense_content_type');
		$contentChannel = $blogSettings->getValue('plugin_googleadsense_content_channel');

		// create a view and export the settings to the template
		$this->setValue('pluginEnabled', $pluginEnabled);
		$this->setValue('client', $client);
		$this->setValue('contentWidth', $contentWidth);
		$this->setValue('contentHeight', $contentHeight);
		$this->setValue('contentFormat', $contentFormat);
		$this->setValue('contentType', $contentType);
		$this->setValue('contentChannel', $contentChannel);

		parent::render();
	}
}

?>
